Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use zerocopy instead of unsafe transmute #51

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

cgwalters
Copy link
Collaborator

@cgwalters cgwalters commented Dec 5, 2024

Followup to #50


ref https://lwn.net/Articles/995814/ etc.

I also did a PR for tar-rs: alexcrichton/tar-rs#392

Thanks to the maintainer who helped me on Discord
to know the right API to call here.

ref https://lwn.net/Articles/995814/ etc.

I also did a PR for tar-rs: alexcrichton/tar-rs#392

Thanks to the maintainer who helped me on Discord
to know the right API to call here.

Signed-off-by: Colin Walters <[email protected]>
@@ -153,8 +154,7 @@ impl FilesystemReader<'_> {

let mut buffer = [0; 65536];
for name in names.split_inclusive(|c| *c == 0) {
// SAFETY: casting i8 to u8 is safe.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@allisonkarlitskaya allisonkarlitskaya merged commit 5049efb into containers:main Dec 5, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants